package org.bite.lesson06;

public class SingletonHungry {
//    //定义一个类的成员变量
//    private static SingletonHungry instance = new SingletonHungry();
//    //将构造方法私有化，使得不能new一个对象
//    private SingletonHungry(){};
//    public static SingletonHungry getInstance(){
//        return instance;
//    }

    /**11.24复习，再写一遍*/
    private static SingletonHungry singletonHungry = new SingletonHungry();
    private SingletonHungry(){};
    public static SingletonHungry getInstance(){
        return singletonHungry;
    }
}
